package cn.twh.wall.beetl.function;

import cn.twh.wall.util.SnowFlake;
import cn.twh.wall.util.SpringUtil;
import org.beetl.core.Context;
import org.beetl.core.Function;

/**
 * 流水生成方法
 *
 * @author TWH
 */
public class SeqGenFunction implements Function {
    private final SnowFlake snowFlake = SpringUtil.getBean(SnowFlake.class);

    @Override
    public Object call(Object[] paras, Context ctx) {
        return snowFlake.nextId();
    }
}
